<template>
  <div class="app-container BannerList">
    <div id="header" class="flex">
      <div class="headerChange">
        <el-button @click="joinTest" :type="num==0?'primary':''">中学报名申请 (<span style="color: #F56C6C;font-weight: bold;font-size: 14px;">{{total0}}</span>)</el-button>
        <el-button @click="testSite" :type="num==1?'primary':''">THUSSAT考试服务申请 (<span style="color: #F56C6C;font-weight: bold;font-size: 14px;">{{total1}}</span>)</el-button>
      </div>
      <el-button type="primary" icon="el-icon-refresh" size="mini" @click="$router.go(0)">
        刷新
      </el-button>
    </div>
    <div v-show="num == 0">
      <apply-join ref="joinTest" @closeApplyJoin="closeApplyJoin"></apply-join>
    </div>
    <div v-show="num == 1">
      <apply-testsite ref="applysite" @closeApplyTestsite="closeApplyTestsite"></apply-testsite>
    </div>
  </div>
</template>

<script>
// import { list, delOperlog, cleanOperlog } from "@/api/system/operlog";
import applyJoin from "@/components/apply/applyJoin";
import applyTestsite from "@/components/apply/applyTestsite";

export default {
  name: "Operlog",
  components: { applyJoin, applyTestsite },
  data() {
    return {
      num: 0,
      total0: '',
      total1: ''
    };
  },
  created() {},
  methods: {
    closeApplyJoin(val){
      this.total0 = val
      console.log(this.total0)
    },
    closeApplyTestsite(val){
      this.total1 = val
      // console.log(this.total1)
    },
    joinTest() {
      this.num = 0;
      this.$refs.joinTest.getList();
       console.log(this.$refs)
    },
    testSite() {
      this.num = 1;
      this.$refs.applysite.getList();
      // console.log(this.$refs)
    },
  },
};
</script>
<style lang="scss" >
.flex {
  display: flex;
}

.BannerList {
  .btnHeader {
    justify-content: space-between;
    border-bottom: 1px solid #c0c4cc;
  }
  #header {
    justify-content: space-between;
    margin-bottom: 20px;
  }

  //批量管理
  .allManage {
    justify-content: space-between;

    .btnManage {
      justify-content: flex-end;
    }
  }
}
</style>


